const defaultState = {
    routeInfo:{
        selectedTab:'home',  // 当前的页签
    }
}

const reducer = (state = defaultState, action) => {
    switch(action.type) {
        case 'changeSelectedTab':
            return {
                routeInfo :{
                    ...state.routeInfo,
                    selectedTab:action.selectedTab
                }
            }
        
        default :
            return state
    }
}

export default reducer